473,416 Members | 1,557 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

How to use a StaticItemTemplate?

I've made an asp:menu control. Does anybody know how do I access the
current menu item text from StaticItemTemplate?

Any help would be apreciated.

Nov 18 '05 #1
2 6962
"Ilmar" <as********@mail.ru> wrote in message
news:eX**************@TK2MSFTNGP09.phx.gbl...
I've made an asp:menu control. Does anybody know how do I access the
current menu item text from StaticItemTemplate?


You should be able to find the asp:Menu control by following Parent pointers
from a control within the StaticItemTemplate. Perhaps from there you can
determine the current menu item.
--
John Saunders
johnwsaundersiii at hotmail
Nov 18 '05 #2
Thanks John,
I finally solved this problem by the following code:
<StaticItemTemplate>
<asp:Label Runat=server>[<%# Eval("Text") %>]</asp:Label>
</StaticItemTemplate>
"John Saunders" <jo**************@notcoldmail.com> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ ×
ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ: news:u2**************@TK2MSFTNGP12.phx.gbl...
"Ilmar" <as********@mail.ru> wrote in message
news:eX**************@TK2MSFTNGP09.phx.gbl...
I've made an asp:menu control. Does anybody know how do I access the
current menu item text from StaticItemTemplate?
You should be able to find the asp:Menu control by following Parent

pointers from a control within the StaticItemTemplate. Perhaps from there you can
determine the current menu item.
--
John Saunders
johnwsaundersiii at hotmail

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: benjamin.soulier | last post by:
Hello to everybody, I Wanted to know if anyone get an item in <asp:menu> to be selected, defining display of items using StaticItemTemplate. I thought specifying a css class for StaticSelected...
2
by: J. Jespersen | last post by:
Hi people, I'm trying to build a menu i asp.net 2.0 (RC) using the Menu control and an XmlSiteMapProvider. I want all letters of my menuitems to be capitalized, but i want the first letter in...
4
by: Andrew Robinson | last post by:
I am using a TreeView to perform navigation and have a few nodes that need to generate a popup menu. For this, I use the SelectedNodeChanged event and then add the relevant "window.open" script to...
0
by: Jay | last post by:
I created a skin for a Menu Control that uses templates and I quickly learned that you cannot include something like the folllowing because of the <%# %>. But this template is important and...
5
by: k.vanderstarren | last post by:
Hi All, I'm trying to convert some ASP.NET code that I found at http://weblogs.asp.net/dannychen/archive/2005/12/02/432190.aspx from VB to C#. I've managed to convert the portion that is in...
0
by: AC [MVP MCMS] | last post by:
I have a navigation control (using the Menu control) that I want to only display static items (nothing dynamic). My rendering looks something like this: <ul> <li><a href="#"><div...
1
by: Kenneth Chan | last post by:
I have created a menu with the following code: <asp:Menu ID="Menu1" runat="server" BackColor="#F7F6F3" Font-Names="Verdana" Font-Size="X-Small" Orientation="Horizontal" BorderWidth="0px"...
0
by: vincent90152900 | last post by:
How to remove the arrow of the menu .net component? My code here <StaticMenuStyle CssClass="p12h20-gray" HorizontalPadding="2" VerticalPadding="2" /> <StaticMenuItemStyle...
0
by: alexandis | last post by:
I do not want to apply hover style for selected item. I need something like <StaticItemTemplate> <% if (((MenuItem)Container.DataItem).Selected == false) { %> // ignore StaticHoverStyle for this...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.